const user = { name: "张三", age: 20 };
const keys = Object.keys(user);
const values = Object.values(user);
const entries = Object.entries(user);
console.log(keys);
console.log(values);
console.log(entries);

const prices = {
  banana: 1,
  apple: 2,
};
console.log(Object.entries(prices));
console.log(
  Object.entries(prices).map((item) => {
    return [item[0], item[1] * 2];
  })
);
